import Mock from 'mockjs';
import { v4 } from 'uuid';
console.log(Mock)
Mock.setup({
    timeout: 700
})
Mock.mock(RegExp(`/api/get/user`+'.*'),'get',(param)=>{
    console.log(param)
    let list = Mock.mock({
        'list|20': [{
            'id': v4,
            'cover': '@image',
            'name|1': ['项目1','项目2','项目4','项目5','项目6','项目7'],
            'apiPrefix': '/api/v1',
            'envs': ['pro', 'release', 'dev', 'dev2'],
            'status|1': Boolean
        }]
    });
    return {
        code: 1,
        data: {
            total: Mock.mock({'a|1-1000':100}).a,
            list: list.list
        }
    }
});